Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix search that starts at root directory "/" #85

Merged
merged 1 commit into from Oct 3, 2012
Merged

Fix search that starts at root directory "/" #85

merged 1 commit into from Oct 3, 2012

Conversation

mmorearty
Copy link
Contributor

Currently, ag fails if the user does a search starting at the root directory of the hard disk, specifying nothing more than "/" for the directory, e.g. "ag foo /". This patch fixes that admittedly rare edge case.

Fix so that the user can do a search starting at the
root directory, e.g. "ag foo /"
@mmorearty
Copy link
Contributor Author

Never mind my previous (now-deleted) comment :-P

@mmorearty
Copy link
Contributor Author

Bleah. My patch works, but it results in ag displaying paths like this for matched files:

//Users/mike/foo.txt

@ggreer
Copy link
Owner

ggreer commented Oct 3, 2012

Eh, it's better than the current behavior.

ggreer added a commit that referenced this pull request Oct 3, 2012
Fix search that starts at root directory "/"
@ggreer ggreer merged commit 435d0e7 into ggreer:master Oct 3, 2012
@ggreer
Copy link
Owner

ggreer commented Oct 3, 2012

Feel free to reopen or submit a new PR or whatever to fix the path printing. I'll warn you though: print.c is an abomination.

@ggreer
Copy link
Owner

ggreer commented Oct 3, 2012

Also, my reaction upon seeing your pull request:

@mmorearty
Copy link
Contributor Author

LOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants